﻿<Window x:Class="WPFExcelReport.ArticleConditions"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:fd="clr-namespace:Labs.Filtering"
        xmlns:local="clr-namespace:WPFExcelReport"
        Title="ArticleConditions" Height="700" Width="1024" 
        xmlns:my="clr-namespace:IntexReportClient" 
        Loaded="Window_Loaded">
    <Window.Resources>
    </Window.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="100"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1.5*"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
            <Button Content="生成报表" Height="40" Margin="60,10,0,0"  Name="btnQuery" Width="90" Click="btnQuery_Click"/>
            <TextBlock FontSize="18"  Height="40"   Width="200" Name="txtArticleNum" Margin="30,10,0,0" Text="请选择品种" />
            <TextBlock  FontSize="18" Height="40"    Width="80" Name="txtArticleVar"   Margin="30,10,0,0"    Text="" />
            <TextBlock  FontSize="18" Height="40"    Width="80" Name="txtColor"  Margin="30,10,0,0"  Text="" />
            <TextBlock  FontSize="18" Height="40"    Width="80" Name="txtFinish"  Margin="30,10,0,0" Text="" />
        </StackPanel>
        <fd:FilteringDataGrid  Grid.Row="1" Grid.Column="0"
                             CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected"  
                               Height="Auto" HorizontalAlignment="Stretch"
                               Width="Auto" VerticalAlignment="Stretch"
                                    IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible" 
                               Margin="0,0,0,0"  
                                       ItemsSource="{Binding Path=ARTICLE}" 
                        x:Name="wAFARBENDataGrid" 
            SelectionChanged="wAFARBENDataGrid_SelectionChanged" 
                             >
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="品种" Binding="{Binding ARTNUM}"/>
                <DataGridTextColumn Header="版本" Binding="{Binding ARTVAR}"/>
                <DataGridTextColumn Header="描述" Binding="{Binding ARTDES}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <Grid Grid.Row="1" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <fd:FilteringDataGrid  Grid.Row="0" Grid.Column="0"
                             CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected"  
                               Height="Auto" HorizontalAlignment="Stretch"
                               Width="Auto" VerticalAlignment="Stretch"
                                    IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ARTICLECOLOR}" 
                               Margin="0,0,0,0" 
                               x:Name="listColor" 
                                  SelectionChanged="listColor_SelectionChanged"
                             >
                <fd:FilteringDataGrid.Columns>
                    <DataGridTextColumn Header="品种" Binding="{Binding ARTNUM}"/>
                    <DataGridTextColumn Header="版本" Binding="{Binding ARTVAR}"/>
                    <DataGridTextColumn Header="色号" Binding="{Binding ARTCOLOR}"/>
                    <DataGridTextColumn Header="描述" Binding="{Binding COLORDES}"/>
                </fd:FilteringDataGrid.Columns>
            </fd:FilteringDataGrid  >
            <fd:FilteringDataGrid  Grid.Row="1" Grid.Column="0"
                             CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected"  
                               Height="Auto" HorizontalAlignment="Stretch"
                               Width="Auto" VerticalAlignment="Stretch"
                                    IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ARTICLEFINISH}" 
                               Margin="0,0,0,0" 
                               x:Name="listFinish" 
                                   SelectionChanged="listFinish_SelectionChanged"
                             >
                <fd:FilteringDataGrid.Columns>
                    <DataGridTextColumn Header="后整理" Binding="{Binding ARTFIN}"/>
                    <DataGridTextColumn Header="描述" Binding="{Binding FINISHDES}"/>
                </fd:FilteringDataGrid.Columns>
            </fd:FilteringDataGrid  >
        </Grid>
        <TextBox  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
            Height="40" Margin="0,0,0,0" Name="textBox1" Width="Auto" HorizontalAlignment="Stretch" />
    </Grid>
</Window>
